# -*- coding: utf-8 -*-
from app.exts import db
import datetime


class UserInfo(db.Model):
    __tablename__ = 'V_StudentInfo'

    studentId = db.Column(db.String(80), primary_key=True)
    Name = db.Column(db.String(80))
    Sex = db.Column(db.String(80))
    birthday = db.Column(db.String(80))
    IdCard = db.Column(db.String(80))
    Polity = db.Column(db.String(80))
    Nation = db.Column(db.String(80))
    NativePlace = db.Column(db.String(80))

    MoveTel = db.Column(db.String(80))
    Email = db.Column(db.String(80))
    QQCard = db.Column(db.String(80))
    FamillyAddress = db.Column(db.String(80))

    FatherName = db.Column(db.String(80))
    FatherTel = db.Column(db.String(80))
    FatherUnit = db.Column(db.String(80))
    MatherName = db.Column(db.String(80))
    MatherUnit = db.Column(db.String(80))
    MatherTel = db.Column(db.String(80))
    SpeGrade = db.Column(db.Integer)
    ClassName = db.Column(db.String(80))
    ClassNo = db.Column(db.String(80))
    CollegeName = db.Column(db.String(80))
    SpecialtyName = db.Column(db.String(80))
    BankName = db.Column(db.String(80))
    BankNo = db.Column(db.String(80))

    # 备注字段
    DutyThing = db.Column(db.String(80))
    PalmThing = db.Column(db.String(80))
    StrongSuit = db.Column(db.String(80))
    # 特长
    OtherThing = db.Column(db.String(80))
    # 其他
    Practice = db.Column(db.String(80))
    ComeWhere = db.Column(db.String(80))



class UserInfo13per(db.Model):
      __tablename__ = 'StudentInfo'

      studentId = db.Column(db.String(80), primary_key=True)
      Name = db.Column(db.String(80))
      DormAddress = db.Column(db.String(80))
      ExamineeType = db.Column(db.String(80))
      UnitSchool=db.Column(db.String(80))
      SchoolYard = db.Column(db.String(80))
      # 学生干部经历
      DutyThing = db.Column(db.String(80))
#       获奖情况
      PalmThing = db.Column(db.String(80))
#       特长
      StrongSuit = db.Column(db.String(80))
#       其他
      OtherThing = db.Column(db.String(80))
#       实践
      Practice = db.Column(db.String(80))
#       科研经历
      ScientificFruit= db.Column(db.String(80))
      # 辅导员
      InputEditUser = db.Column(db.String(80))


class Lessons(db.Model):
      __tablename__ = 'ClassInfo'

      ClassName = db.Column(db.String(80))
      ClassNo = db.Column(db.String(80), primary_key=True)
      TeacherId = db.Column(db.String(80))
      SpecialtyNo = db.Column(db.String(80))
      ClickBate = db.Column(db.String(80))


class Teacher(db.Model):
      __tablename__ = 'TeacherInfo'

      TeacherId = db.Column(db.String(80), primary_key=True)
      TeacherName = db.Column(db.String(80))


class Log(db.Model):
     __tablename__ = 'qywx_apps_log'

     content = db.Column(db.String(80))
     inputuser = db.Column(db.String(80))
     selecttime = db.Column(db.DateTime, default=datetime.datetime.now(),primary_key=True)

# 专业表
class Specialty(db.Model):
      __tablename__ = 'SpecialtyInfo'

      SpecialtyNo = db.Column(db.String(80), primary_key=True)
      SpecialtyName = db.Column(db.String(80))
      CollegeNo = db.Column(db.String(80))


# 门代码
class Door(db.Model):
    __tablename__ = 'qywx_apps_door'

    door_id = db.Column(db.String(80), primary_key=True)
    door_name = db.Column(db.String(80))
    door_code = db.Column(db.String(80))
